package com.tsk.example.annotation;

import com.tsk.example.result.ResponseAdvice;
import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author: 黄嘉振
 * @create: 2023/3/8 10:13
 * @description:  统一响应开关 @EnableResultServer
 **/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RestControllerAdvice
@Import(ResponseAdvice.class)
public @interface EnableResultServer {
    @AliasFor(annotation = RestControllerAdvice.class, attribute = "basePackages")
    String[] value() default {};
}
